/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.sbbs.jsf.car.service;

import java.util.List;
import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.inject.Named;
import org.sbbs.jsf.car.dao.CarDao;
import org.sbbs.jsf.car.entity.Car;

/**
 *
 * @author Mr.fdc <fdc_messenger@126.com>
 */
@Stateless
public class CarServiceImpl implements CarService {

    @Inject
//    @Named("carDao")
    private CarDao dao;

    public void setDao(CarDao dao) {
        this.dao = dao;
    }

    @Override
    public Car addCar(Car car) {
        return this.dao.addCar(car);
    }

    @Override
    public boolean delCar(Car car) {
        return this.dao.delCar(car);
    }

    @Override
    public List<Car> findAllCar() {
        return this.dao.findAllCar();
    }

}
